package com.example.administrator.hualangrecyclerview;

import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;

public class DrawableActivity extends AppCompatActivity {

    ImageView imageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_drawable);
        imageView = (ImageView) findViewById(R.id.image);
        Drawable drawable = new RevealDrawable(getResources().getDrawable(R.mipmap.all_unselected), getResources().getDrawable(R.mipmap.all_selected),RevealDrawable.HORIZONTAL);
        imageView.setImageDrawable(drawable);
    }

    int count = 0;

    public void setLevel(View view) {
        //count +=1000;
        count = count + 1000;
        count = count % 10000;
        imageView.setImageLevel(count);
    }
}
